home *** CD-ROM | disk | FTP | other *** search
Java Source | 2000-08-01 | 3.3 KB | 116 lines |
- import waba.io.*;
- import waba.ui.*;
-
- public class InfosMaker extends MainWindow
- {
- // the creator ID of the software
- private static final String CREATOR_ID = "eCrs";
- private static final String[] PAGES =
- {
- "eCross v1.1\n\n" +
- "www.jext.org\n" +
- "guy.romain@bigfoot.com\n\n" +
- "Coding: Romain Guy\n" +
- "Levels: Benjamin Rigaud\n",
-
- "eCross is a reflexion game based\n" +
- "on a Game Boy cartridge.\n" +
- "The game Mario's Picross is one\n" +
- "of the best ever on Game Boy.\n\n" +
- "Simply follow these instructions\n" +
- "to learn how to play. It is easy.\n",
-
- "Your goal is to find the hidden\n" +
- "picture by filling cells of the grid\n" +
- "using the given informations.\n" +
- "These infos are on left and top of\n" +
- "the grid and given as numbers.\n\n" +
- "You have 30 minutes and your\n" +
- "brain to achieve a level.\n",
-
- "eCross gives you three tools to\n" +
- "help you in your task.\n" +
- "The tools are the marker, the\n" +
- "helper and the eraser.\n\n" +
- "Marker fills in a cell.\n" +
- "Helper ticks a cell.\n" +
- "Eraser cleans a cell.\n",
-
- "To select a tool either tap the\n" +
- "tools icon, either press the\n" +
- "agenda and contacts keys.\n\n" +
- "First key switch forward and\n" +
- "second one backward.\n\n" +
- "Tools order: marker, helper\n" +
- "and eraser.\n",
-
- "Whenever you fill a wrong cell\n" +
- "you lose time.\n" +
- "First error is unpunished, then\n" +
- "you lose two, then four, then six\n" +
- "and finally, 8 minutes.\n\n" +
- "To avoid making mistakes, use\n" +
- "the helper tool to mark the cells\n" +
- "you think to be empty.\n",
-
- "To fill a row or col, you have to\n" +
- "use the series of numbers.\n\n" +
- "Each number tells you how many\n" +
- "successive cells you have to fill.\n" +
- "Between each group of cells,\n" +
- "leave at least one cell empty.\n",
-
- "For instance, the serie \"1 1 2\"\n" +
- "means: fill one cell, leave at least\n" +
- "one blank, fille one cell, leave at\n" +
- "least one blank and fill two cells.\n\n" +
- "As soon as you unhid a group,\n" +
- "surround it with crosses (helper)\n" +
- "because you are sure them to be\n" +
- "empty.\n",
-
- "eCross is (C)2000 Romain Guy\n"+
- "Licensed under GNU GPL\n\n" +
- "Thanks to Guilherme Hazan,\n" +
- "Kevin Yank & Jennifer Shelamer.\n\n" +
- "Refer to HTML documentation\n" +
- "for full explanations.\n"
- };
-
- // creates a new catalog
-
- public void onStart()
- {
- Catalog c = new Catalog("eCross Infos." + CREATOR_ID + ".eCrs", Catalog.READ_ONLY);
- if (c.isOpen())
- c.delete();
-
- c = new Catalog("eCross Infos." + CREATOR_ID + ".eCrs", Catalog.CREATE);
- if (!c.isOpen())
- return;
-
- c.addRecord(1);
- c.writeBytes(new byte[] { (byte) PAGES.length }, 0, 1);
-
- for (int i = 0; i < PAGES.length; i++)
- {
- char[] _c = PAGES[i].toCharArray();
- byte[] b = new byte[_c.length];
- int len = b.length;
-
- for (int j = 0; j < len; j++)
- b[j] = (byte) _c[j];
-
- if (c.addRecord(len) == -1)
- return;
- if (c.writeBytes(b, 0, len) != len)
- return;
- }
-
- c.close();
- exit(0);
- }
- }
-
- // End of InfosMaker.java
-